@charset "UTF-8";

/**
 * 通用栅格生成器makeGrid
 */

.makeGrid(@grid-column-width, @grid-gutter-width, @grid-offset, @grid-name:grid, @grid-columns:12) {
	.@{grid-name} {
		box-sizing:content-box;
	    padding-left: @grid-offset;
	    padding-right: @grid-offset;
	    margin-left: 0 - @grid-gutter-width; 
	}

	.@{grid-name}:before,
	.@{grid-name}:after{
		content: " ";
  		display: table;
	}

	.@{grid-name}:after {
	  clear: both;
	} 

	.@{grid-name} [class^="col-"] {
	    margin-left: @grid-gutter-width;
	    float: left;
	}

	.makeCommonGrid(1);
}

.makeCommonGrid(@index) when (@index < @grid-columns + 1) {
	.@{grid-name} .col-@{index} {
        width: @grid-column-width * @index + @grid-gutter-width * @index - @grid-gutter-width;
    }
	.makeCommonGrid(@index + 1);
}